
package com.asiainfo.dao;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

import org.apache.ibatis.session.TransactionIsolationLevel;
import org.apache.ibatis.transaction.Transaction;
import org.apache.ibatis.transaction.jdbc.JdbcTransaction;

public class MyJdbcTransaction extends JdbcTransaction implements Transaction {

	public MyJdbcTransaction(DataSource ds, TransactionIsolationLevel desiredLevel, boolean desiredAutoCommit) {
		super(ds, desiredLevel, desiredAutoCommit);
	}

	public MyJdbcTransaction(Connection connection) {
		super(connection);
	}

	@Override
	public Connection getConnection() throws SQLException {
		Connection conn = super.getConnection();
		System.out.println("================获得jdbc连接=====================");
		
		return conn;
	}

	@Override
	public void close() throws SQLException {
		// TODO...
		System.out.println("================释放jdbc连接=====================");
	}

}